Optimal. Leaf size=81 \[ -\frac{3 (a+5 b) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}+\frac{b \sec (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.074872, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {4133, 456, 453, 206} \[ -\frac{3 (a+5 b) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}+\frac{b \sec (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4133
Rule 456
Rule 453
Rule 206
Rubi steps
\begin{align*} \int \csc ^5(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{b+a x^2}{x^2 \left (1-x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{\operatorname{Subst}\left (\int \frac{-4 b-3 (a+b) x^2}{x^2 \left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{4 f}\\ &=-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac{\operatorname{Subst}\left (\int \frac{8 b+(3 a+7 b) x^2}{x^2 \left (1-x^2\right )} \, dx,x,\cos (e+f x)\right )}{8 f}\\ &=-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{b \sec (e+f x)}{f}-\frac{(3 (a+5 b)) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (e+f x)\right )}{8 f}\\ &=-\frac{3 (a+5 b) \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac{(3 a+7 b) \cot (e+f x) \csc (e+f x)}{8 f}-\frac{(a+b) \cot (e+f x) \csc ^3(e+f x)}{4 f}+\frac{b \sec (e+f x)}{f}\\ \end{align*}
Mathematica [B] time = 1.84283, size = 198, normalized size = 2.44 \[ \frac{-(a+b) \csc ^4\left (\frac{1}{2} (e+f x)\right )-2 (3 a+7 b) \csc ^2\left (\frac{1}{2} (e+f x)\right )+\frac{-(a+b) \sec ^4\left (\frac{1}{2} (e+f x)\right )+\tan ^2\left (\frac{1}{2} (e+f x)\right ) \sec ^4\left (\frac{1}{2} (e+f x)\right ) ((3 a+7 b) \cos (e+f x)+4 (a+2 b))+2 \sec ^2\left (\frac{1}{2} (e+f x)\right ) \left (4 \cos (e+f x) \left (-3 (a+5 b) \log \left (\sin \left (\frac{1}{2} (e+f x)\right )\right )+3 (a+5 b) \log \left (\cos \left (\frac{1}{2} (e+f x)\right )\right )+8 b\right )-3 (a+13 b)\right )}{\tan ^2\left (\frac{1}{2} (e+f x)\right )-1}}{64 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.049, size = 142, normalized size = 1.8 \begin{align*} -{\frac{\cot \left ( fx+e \right ) a \left ( \csc \left ( fx+e \right ) \right ) ^{3}}{4\,f}}-{\frac{3\,a\csc \left ( fx+e \right ) \cot \left ( fx+e \right ) }{8\,f}}+{\frac{3\,a\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{8\,f}}-{\frac{b}{4\,f \left ( \sin \left ( fx+e \right ) \right ) ^{4}\cos \left ( fx+e \right ) }}-{\frac{5\,b}{8\,f \left ( \sin \left ( fx+e \right ) \right ) ^{2}\cos \left ( fx+e \right ) }}+{\frac{15\,b}{8\,f\cos \left ( fx+e \right ) }}+{\frac{15\,b\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{8\,f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01691, size = 136, normalized size = 1.68 \begin{align*} -\frac{3 \,{\left (a + 5 \, b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) - 3 \,{\left (a + 5 \, b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac{2 \,{\left (3 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{4} - 5 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{2} + 8 \, b\right )}}{\cos \left (f x + e\right )^{5} - 2 \, \cos \left (f x + e\right )^{3} + \cos \left (f x + e\right )}}{16 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.772039, size = 481, normalized size = 5.94 \begin{align*} \frac{6 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{4} - 10 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{2} - 3 \,{\left ({\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{5} - 2 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{3} +{\left (a + 5 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 3 \,{\left ({\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{5} - 2 \,{\left (a + 5 \, b\right )} \cos \left (f x + e\right )^{3} +{\left (a + 5 \, b\right )} \cos \left (f x + e\right )\right )} \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) + 16 \, b}{16 \,{\left (f \cos \left (f x + e\right )^{5} - 2 \, f \cos \left (f x + e\right )^{3} + f \cos \left (f x + e\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.23797, size = 379, normalized size = 4.68 \begin{align*} \frac{12 \,{\left (a + 5 \, b\right )} \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right ) - \frac{{\left (a + b - \frac{8 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{16 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{18 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{90 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )}{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) - 1\right )}^{2}} - \frac{8 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} - \frac{16 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{128 \, b}{\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1}}{64 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]